package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionListener;

import javabean.JPanelImagen;

import javax.swing.JButton;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JPanel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import Imagenes.JBtnEstandar;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class formPrincipal extends javax.swing.JFrame {
	private JPanelImagen pnPrincipal;
	private JBtnEstandar btConsultar;
	private JBtnEstandar btSalir;
	private JBtnEstandar btRegistrarPlanteamiento;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public formPrincipal() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			this.setResizable(false);
			{
				pnPrincipal = new JPanelImagen();
				getContentPane().add(pnPrincipal, BorderLayout.CENTER);
				pnPrincipal.setRutaImagen("/Imagenes/Principal.jpeg");
				pnPrincipal.setLayout(null);
				pnPrincipal.setPreferredSize(new java.awt.Dimension(677, 436));
				{
					btConsultar = new JBtnEstandar();
					pnPrincipal.add(getBtConsultar());
					btConsultar.setText("Consultar Planteamientos");
					btConsultar.setBounds(20, 38, 251, 38);
				}
				{
					btRegistrarPlanteamiento = new JBtnEstandar();
					pnPrincipal.add(getBtRegistrarPlanteamiento());
					btRegistrarPlanteamiento.setText("Registrar Planteamiento");
					btRegistrarPlanteamiento.setBounds(20, 92, 251, 37);
				}
				{
					btSalir = new JBtnEstandar();
					pnPrincipal.add(getBtSalir());
					btSalir.setText("Salir");
					btSalir.setBounds(12, 377, 246, 39);
				}
			}
			pack();
			this.setSize(667, 457);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	
	public JBtnEstandar getBtConsultar() {
		return btConsultar;
	}
	
	public JBtnEstandar getBtRegistrarPlanteamiento() {
		return btRegistrarPlanteamiento;
	}
	
	public JBtnEstandar getBtSalir() {
		return btSalir;
	}
	
	public void AgregarEscuchadores(ActionListener escuchador){
		this.btConsultar.addActionListener(escuchador);
		this.btRegistrarPlanteamiento.addActionListener(escuchador);
		this.btSalir.addActionListener(escuchador);
	}

}
